# math_server.py
from datetime import datetime

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("Time")  # 定义服务名称

@mcp.tool()
async def get_current_time():
    """
    获取当前时间
    """
    fmt = "%Y-%m-%d %H:%M:%S"
    now = datetime.now().strftime(fmt)
    return f"当前的时间为：{now}"


if __name__ == "__main__":
    mcp.run(transport="stdio")

